function setJson(n, t, i) {
	return n[t] = i,
	n
}
function player(n) {
	var t = document.createElement("audio");
	t.src = n;
	t.play()
}
var loadFriend = function (n, t, i, r, u) {
	console.log(i);
	n.getJSON("/index.php?m=Home&c=Swoole&a=ajax_friendList", {
		page : u
	}, function (r) {
		var u = document.getElementById("friden").innerHTML;
		i(u).render(r, function (n) {
			document.getElementById("firendview").innerHTML = n
		});
		n("#firendview").find(".badge.bg-sub").on("click", function () {
			var i = n(this).data("id"),
			r = n(this).data("head");
			n.get("/index.php?m=Home&c=Swoole&a=ajax_getFriendGroup", function (u) {
				var f = t.open({
						type : 1,
						title : "添加好友",
						closeBtn : 0,
						area : ["516px", "350px"],
						shadeClose : !0,
						btn : ["下一步", "算了吧"],
						skin : "yourclass",
						content : '<div id="addFirend"> <div class="float-left" style="background-color:#f8f8f8;border-right:1px solid #999;height:250px;width:100px;text-align:center"><img src="' + r + '" width="80" height="80" class="radius-big" /><\/div><div class="layui-form-label layui-form-area layui-form" style="position:absolute;left:102px;top:0px"><label>请输入验证信息：<\/label><textarea placeholder="我是..." name="content" style="width:394px;height:50px"><\/textarea><label style="float:left;width:392px">添加到分组：<\/label><select name="group" class="input" style="display:block">' + u + "<\/select><\/div> <\/div>",
						yes : function () {
							var r = parent.layui.layim.cache().mine;
							//parent.chat.server.addFriends('{"content":"' + n("textarea").val() + '","firendid":' + i + ',"mine":' + JSON.stringify(r) + ',"groupid":' + n("select[name='group']").val() + "}");
							parent.socket.send('{"type": "addFirend","content":"' + n("textarea").val() + '","firendid":' + i + ',"mine":' + JSON.stringify(r) + ',"groupid":' + n("select[name='group']").val() + "}");
							t.close(f);
							t.msg("申请成功，等待对方确认。", {
								icon : 1
							})
						}
					})
			})
		})
	})
}